From 28b8541847eeb0a0e05562946a41ed52770fd816 Mon Sep 17 00:00:00 2001 From: Chun-wei Fan Date: Wed, 20 May 2015 17:31:02 +0800 Subject: [PATCH] gtk-demo: Don't Distribute demos.h Since demos.h is now generated according to the platform for which GTK+ is built, don't distribute it. Generate a Windows-specific demos.h.win32 and distribute that instead, in which the Visual Studio build files will copy it to demos.h, so that the build will proceed normally. https://bugzilla.gnome.org/show_bug.cgi?id=749622 --- build/win32/vs10/gtk-gen-srcs.props | 4 ++ build/win32/vs10/gtk-prebuild.vcxproj | 26 ++++++++++++ build/win32/vs9/gtk-gen-srcs.vsprops | 4 ++ build/win32/vs9/gtk-prebuild.vcproj | 58 +++++++++++++++++++++++++++ demos/gtk-demo/Makefile.am | 19 ++++++--- 5 files changed, 105 insertions(+), 6 deletions(-) diff --git a/build/win32/vs10/gtk-gen-srcs.props b/build/win32/vs10/gtk-gen-srcs.props index f74aaa518f..da22573d53 100644 --- a/build/win32/vs10/gtk-gen-srcs.props +++ b/build/win32/vs10/gtk-gen-srcs.props @@ -65,6 +65,7 @@ $(PythonPath)\python $(GlibEtcInstallRoot)\bin\gdbus-codegen --interface-prefix cd $(SolutionDir) $(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest + copy ..\..\..\demos\gtk-demo\demos.h.win32 ..\..\..\demos\gtk-demo\demos.h <_PropertySheetDisplayName>gtkgensrcsprops @@ -85,5 +86,8 @@ cd $(SolutionDir) $(GenerateGtkWin32RC) + + $(CopyDemosH) + diff --git a/build/win32/vs10/gtk-prebuild.vcxproj b/build/win32/vs10/gtk-prebuild.vcxproj index b5031b499e..5a5df1d93c 100644 --- a/build/win32/vs10/gtk-prebuild.vcxproj +++ b/build/win32/vs10/gtk-prebuild.vcxproj @@ -209,6 +209,32 @@ $(GenGdkConfigHBroadway) ..\..\..\gdk\gdkconfig.h;..\..\..\GDK_BROADWAY_BUILD;..\..\..\MSVC_$(Configuration)_Broadway;%(Outputs) + + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + Copying demos.h from demos.h.win32... + $(CopyDemosH) + ..\..\..\demos\gtk-demo\demos.h;%(Outputs) + diff --git a/build/win32/vs9/gtk-gen-srcs.vsprops b/build/win32/vs9/gtk-gen-srcs.vsprops index ba483effbc..6402232886 100644 --- a/build/win32/vs9/gtk-gen-srcs.vsprops +++ b/build/win32/vs9/gtk-gen-srcs.vsprops @@ -66,4 +66,8 @@ cd $(SolutionDir) Name="GenerateGtkWin32RC" Value="$(PythonPath)\python ..\process-in-win32.py --gtkwin32rc --gtk3manifest" /> + diff --git a/build/win32/vs9/gtk-prebuild.vcproj b/build/win32/vs9/gtk-prebuild.vcproj index 1c43f726eb..8f31a4b55c 100644 --- a/build/win32/vs9/gtk-prebuild.vcproj +++ b/build/win32/vs9/gtk-prebuild.vcproj @@ -217,6 +217,64 @@ /> + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am index 6fcfa3100e..91a59d71cd 100644 --- a/demos/gtk-demo/Makefile.am +++ b/demos/gtk-demo/Makefile.am @@ -3,7 +3,7 @@ include $(top_srcdir)/Makefile.decl ## These should be in the order you want them to appear in the ## demo app, which means alphabetized by demo title, not filename -demos = \ +demos_base = \ application.c \ assistant.c \ builder.c \ @@ -63,7 +63,9 @@ demos = \ tree_store.c if OS_UNIX -demos += pagesetup.c +demos = $(demos_base) pagesetup.c +else +demos = $(demos_base) endif AM_CPPFLAGS = \ @@ -96,7 +98,8 @@ EXTRA_DIST += \ data/symbolic-source.svg \ demo.gresource.xml \ $(RESOURCES) \ - org.gtk.Demo.gschema.xml + org.gtk.Demo.gschema.xml \ + demos.h.win32 gsettings_SCHEMAS = \ org.gtk.Demo.gschema.xml @@ -106,11 +109,15 @@ gsettings_SCHEMAS = \ demos.h: $(demos) geninclude.pl $(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos)) > demos.h +demos.h.win32: $(demos_base) geninclude.pl + $(AM_V_GEN) (here=`pwd` ; cd $(srcdir) && $(PERL) $$here/geninclude.pl $(demos_base)) > demos.h.win32 + +nodist_gtk3_demo_SOURCES = demos.h + gtk3_demo_SOURCES = \ $(demos) \ demo_resources.c \ - main.c \ - demos.h + main.c gtk3_demo_DEPENDENCIES = $(DEPS) gtk3_demo_LDADD = $(LDADDS) @@ -228,6 +235,6 @@ uninstall-update-icon-cache: $(AM_V_at)$(POST_UNINSTALL) test -n "$(DESTDIR)" || $(update_icon_cache) "$(iconthemedir)" -DISTCLEANFILES = demos.h +DISTCLEANFILES = demos.h demos.h.win32 -include $(top_srcdir)/git.mk -- 2.30.2